package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:47 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductGlossaryRelateBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductGlossaryRelate productGlossaryRelate;

  protected BeanMap getBeanMap() {

    return new BeanMap(productGlossaryRelate);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.Id);

    mappedDaoFields.put(
        "productDefineId",
        com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.ProductDefineId);

    mappedDaoFields.put(
        "productGlossaryId",
        com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.ProductGlossaryId);

    mappedDaoFields.put(
        "relatedProductGlossaryId",
        com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.RelatedProductGlossaryId);

    mappedDaoFields.put(
        "relatedType", com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.RelatedType);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.Remarks);

    mappedDaoFields.put(
        "relatedGlossaryCode",
        com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.RelatedGlossaryCode);

    mappedDaoFields.put(
        "relatedGlossaryName",
        com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.RelatedGlossaryName);

    mappedDaoFields.put(
        "relatedName", com.ourteam.product.requirement.dao.IProductGlossaryRelateDAO.RelatedName);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductGlossaryRelateBean() {
    super();

    this.productGlossaryRelate = new com.ourteam.product.requirement.dao.ProductGlossaryRelate();
  }

  public ProductGlossaryRelateBean(
      com.ourteam.product.requirement.dao.ProductGlossaryRelate productGlossaryRelate) {
    super();

    this.productGlossaryRelate = productGlossaryRelate;
  }

  public com.ourteam.product.requirement.dao.ProductGlossaryRelate
      convertToProductGlossaryRelate() {
    return this.productGlossaryRelate;
  }

  public com.ourteam.product.requirement.dao.ProductGlossaryRelate convertTo() {
    return this.productGlossaryRelate;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productGlossaryRelate.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productGlossaryRelate.setId(id);
  }

  /**
   * Get productDefineId
   *
   * @return long
   */
  public long getProductDefineId() {
    return (long) this.productGlossaryRelate.getProductDefineId();
  }

  /**
   * Set productDefineId
   *
   * @parameter long
   */
  public void setProductDefineId(long productDefineId) {

    this.productGlossaryRelate.setProductDefineId(productDefineId);
  }

  /**
   * Get productGlossaryId
   *
   * @return long
   */
  public long getProductGlossaryId() {
    return (long) this.productGlossaryRelate.getProductGlossaryId();
  }

  /**
   * Set productGlossaryId
   *
   * @parameter long
   */
  public void setProductGlossaryId(long productGlossaryId) {

    this.productGlossaryRelate.setProductGlossaryId(productGlossaryId);
  }

  /**
   * Get relatedProductGlossaryId
   *
   * @return long
   */
  public long getRelatedProductGlossaryId() {
    return (long) this.productGlossaryRelate.getRelatedProductGlossaryId();
  }

  /**
   * Set relatedProductGlossaryId
   *
   * @parameter long
   */
  public void setRelatedProductGlossaryId(long relatedProductGlossaryId) {

    this.productGlossaryRelate.setRelatedProductGlossaryId(relatedProductGlossaryId);
  }

  /**
   * Get relatedType
   *
   * @return String
   */
  public String getRelatedType() {
    return (String) this.productGlossaryRelate.getRelatedType();
  }

  /**
   * Set relatedType
   *
   * @parameter String
   */
  public void setRelatedType(String relatedType) {

    this.productGlossaryRelate.setRelatedType(relatedType);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productGlossaryRelate.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productGlossaryRelate.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productGlossaryRelate.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productGlossaryRelate.setRemarks(remarks);
  }

  /**
   * Get relatedGlossaryCode
   *
   * @return String
   */
  public String getRelatedGlossaryCode() {

    return (String) this.productGlossaryRelate.getRelatedGlossaryCode();
  }

  /**
   * Get relatedGlossaryName
   *
   * @return String
   */
  public String getRelatedGlossaryName() {

    return (String) this.productGlossaryRelate.getRelatedGlossaryName();
  }

  /**
   * Get relatedName
   *
   * @return String
   */
  public String getRelatedName() {
    return (String) this.productGlossaryRelate.getRelatedName();
  }

  /**
   * Set relatedName
   *
   * @parameter String
   */
  public void setRelatedName(String relatedName) {

    this.productGlossaryRelate.setRelatedName(relatedName);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductGlossaryRelateBean) == false) {
      return false;
    } // end if

    ProductGlossaryRelateBean other = (ProductGlossaryRelateBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductGlossaryRelate tempProductGlossaryRelate =
        other.convertToProductGlossaryRelate();

    if (tempProductGlossaryRelate == null || this.productGlossaryRelate == null) {
      isEqual = false;
    } else if (tempProductGlossaryRelate == this.productGlossaryRelate
        || tempProductGlossaryRelate.equals(this.productGlossaryRelate)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductGlossaryRelateBean[] toArray(
      com.ourteam.product.requirement.dao.ProductGlossaryRelate[] aProductGlossaryRelates) {

    return toArray(aProductGlossaryRelates, null);
  }

  public static ProductGlossaryRelateBean[] toArray(
      com.ourteam.product.requirement.dao.ProductGlossaryRelate[] aProductGlossaryRelates,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductGlossaryRelates)) {
      return new ProductGlossaryRelateBean[0];
    }

    int length = aProductGlossaryRelates.length;

    ProductGlossaryRelateBean[] beans = new ProductGlossaryRelateBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductGlossaryRelateBean(aProductGlossaryRelates[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductGlossaryRelates[i]});
      }
    }

    return beans;
  }
}
